var msgbox;

var diag;

//function newMsgBox(width, height, title, url)
//{
//	msgbox = new Msgbox({
//		width : width,
//		height : height,
//		title : title,
//		type : 'iframe',
//		content : url,
//		bgOpacity : 0.8,
//		allowDrag : false,
//		lock : true,
//	});
//	msgbox.show();
//}

function closeMsgBox()
{  
	msgbox.close();
}

function showPopWindow(width, height, title, url,contentProportion)
{
	alert(height)
	msgbox = new $.msgbox({
		width : width,
		height : height,
		title : title,
		type : 'iframe',
		content : url,
		bgOpacity : 0.8,
		allowDrag : true,
		boxAnimate: false,
		bgAnimate: true,
		contentProportion:contentProportion
	}).show();
}

/**
 * 自定义公共JS方法
 */
$(function() {
	$.extend({
		
		'toAdd' : function(width, height, title, url,contentProportion) {
			msgbox = new $.msgbox({
				width : width,
				height : height,
				title : title,
				type : 'iframe',
				content : url,
				bgOpacity : 0.8,
				allowDrag : false,
				boxAnimate: false,
				bgAnimate: true,
				contentProportion:contentProportion
			}).show();
			
		},

		'toMod' : function(width, height, title, url) {
			msgbox = new $.msgbox({
				width : width,
				height : height,
				title : title,
				type : 'iframe',
				content : url,
				bgOpacity : 0.8,
				bgAnimate: false,
				allowDrag : false
			}).show();
        },
        
        'toAddDiag' : function(width, height, title, url) {
        	diag = new Dialog();
        	diag.Width = width;
        	diag.Height = height;
        	diag.Title = title;
        	diag.URL = url;
        	diag.show();
		},
        
        'toModDiag' : function(width, height, title, url) {
        	diag = new Dialog();
        	diag.Width = width;
        	diag.Height = height;
        	diag.Title = title;
        	diag.URL = url;
        	diag.show();
		}
		
	});
});


